<?php
/*
	本插件：$this->model('model')->方法名();
	其他地方调用：model('jy_bigwheel/model')->方法名();
*/
namespace jy_bigwheel;
defined('BY_JYA') or exit('error');
class model extends \plugin{
	public function merchgame($merchid=0){
		$bigwheelgames=pdo_get('jy_weishop_game',array('status'=>1,'ismerch'=>1,'merchtype'=>0,'uniacid'=>$_SESSION['uniacid']));
		if(!$bigwheelgames['id']){
			$bigwheelgames=pdo_get('jy_weishop_game',array('status'=>1,'ismerch'=>1,'merchtype'=>1,'limitmerchids like'=>'%;'.$merchid.';%','uniacid'=>$_SESSION['uniacid']));
		}
		if(!$bigwheelgames['id']){
			$bigwheelgames=pdo_get('jy_weishop_game',array('status'=>1,'merchid'=>$merchid,'uniacid'=>$_SESSION['uniacid']));
		}
		return $bigwheelgames;
	}
}
?>